/* @(#)GSLoginAction.java    
 *
 * Project: BUS
 *
 * Modify Information:
 * =============================================================================
 *   Author       Date       Description
 *   ------------ ---------- ---------------------------------------------------
 *   Simonyi Peng 2006-2-16    建立
 *
 * Copyright Notice:
 * =============================================================================
 *    Copyright (c) 2001-2006 Beijing HiTRUST Technology Co., Ltd. 1808 Room, 
 *        Science & Technology Building, No. 9 South Street, Zhong Guan Cun, 
 *        Haidian District, Beijing ,100081, China All rights reserved.
 *
 *    This software is the confidential and proprietary information of
 *        Beijing HiTRUST Technology Co., Ltd. ("Confidential Information").
 *        You shall not disclose such Confidential Information and shall use it
 *        only in accordance with the terms of the license agreement you entered
 *        into with HiTRUST.
 *
 * Warning:
 * =============================================================================
 * 
 */
package com.hitrust.gs.action;


import system.LoginContext;
import com.hitrust.gs.dao.GSManufactureDAO;
import com.hitrust.gs.lib.GSBaseConstants;
import com.hitrust.gs.service.GSBaseAction;
import com.hitrust.gs.service.GSBaseForm;

public class GSOrderDetailRejectConfirmAction extends GSBaseAction {
	public String execute(GSBaseForm aForm) throws Exception {
        int totalCount = Integer.parseInt(aForm.getRequest().getParameter("totalCount"));
        LoginContext context = (LoginContext) aForm.getSession().getAttribute(GSBaseConstants.LOGIN);
        String tRs = "";
        for(int i=0; i<totalCount; i++) {     
            String[] tStr = new String[3];
            tStr[0] = aForm.getRequest().getParameter("signOrderDetailId_"+i);
            tStr[1] = aForm.getRequest().getParameter("signQty_"+i);
            tStr[2] = context.getLoginUserName();
            GSManufactureDAO dao = new GSManufactureDAO();
            dao.updateOrderDetail(GSBaseConstants.ORDER_ORDER_REJECT, tStr[1],
            		new framework.core.DateUtil().getDateString(),
            		new framework.core.DateUtil().getTimeString(),tStr[0]);
        }
        
        return GSBaseConstants.FORWARD_SUCCESS;
    }
}
